import request from '@/utils/request'
import qs from 'qs'

export function initData(url, params) {
  return request({
    url: url + '?' + qs.stringify(params, {
      indices: false
    }),
    method: 'get'
  })
}

export function download(url, params) {
  return request({
    url: url + '?' + qs.stringify(params, {
      indices: false
    }),
    method: 'get',
    responseType: 'blob'
  })
}

// 下载合同附件接口
export function downloadHeTong(params) {
  return request({
    url: 'download',
    method: 'get',
    params,
    err: true
  })
}
